package io.github.shenbinglife.springboot2.layui.admin.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.github.shenbinglife.springboot2.layui.common.model.BaseEntity;

import javax.persistence.*;

@Entity
@Table(name = "tbl_sys_user", indexes = {@Index(columnList = "name"), @Index(columnList = "age")})
public class User extends BaseEntity {
    public enum UserState {
        disabled, enabled
    }

    public static final String DEFAULT_PWD = "111111";

    private String name;
    private Integer age;
    private String account;
    @Enumerated(EnumType.ORDINAL)
    @Column(columnDefinition = "TINYINT(1)")
    private UserState state;
    private String description;
    private String mobilePhone;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public UserState getState() {
        return state;
    }

    public void setState(UserState state) {
        this.state = state;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getMobilePhone() {
        return mobilePhone;
    }

    public void setMobilePhone(String mobilePhone) {
        this.mobilePhone = mobilePhone;
    }
}
